'''
@author: haiwen
@date: 2020/9/27
@file: demo.py
'''
import os

import allure
import pytest

from functools import wraps

from pylib.pulgins import ConvertData, dynamic_report

from pylib.pulgins import Config
from pylib.webui.business import LoginPage


class Base:
    def __init__(self):
        print([m.__name__ for m in self.__class__.mro()])

    def get_class_name(self):
        return self.__class__.__name__

    def get_parent_name(self):
        bases=self.__class__.__bases__
        return [base.__name__ for base in bases]

    @classmethod
    def get_ancestor_names(cls):
       return [m.__name__ for m in cls.mro()]

class Father(Base):
    pass

class Child(Father):
    pass

class Sub(Child):
    pass


if __name__ == '__main__':
    from conf.env import user
    page=LoginPage()
    page.login(user['email'],user['psw']).to_schedule().new_schedule('中秋晚会123','zhangsan').logout().login('zhangsan@test.com','123456').schedule_check('中秋晚会123')
    page.close_browser()
    # name=Sub().get_parent_name()
    # print(name)